import re

A = ["文字11111还有22222其他33333", "文字11", "文字21", "文字21", "文字21","文字71", "文字81", "文字91"]
B = "文字11111还有22222其他33333"
match = re.search(r"(\d+)", B)
print(match.group(1))

match2 = re.findall(r"(\d+)", B)
print(match2)
